package com.pcjavanet.collect.mes.dao;

import java.util.Iterator;
import java.util.List;

import org.springframework.dao.DataAccessException;

import com.pcjavanet.collect.mes.to.ActivityData;

/**
 * interface ActivityDataDao.
 * @version 4.0
 * @author jerry_xia
 * @date May 17,2012
 */
public interface ActivityDataDao {

	/**
	 * get all activity data by data key and chart type.
	 * @param monitorId TODO
	 * @param dataId -int
	 * @param chartType -String
	 * @return List<ActivityData> - activityDataList
	 * @throws DataAccessException
	 */
	public List<ActivityData> getAllActivityByDataKeyAndChartType(int monitorId, final int dataId, final String chartType,String netuserId) throws DataAccessException;
	
	/**
	 * get current page activity data by data key and chart type.
	 * @param monitorId TODO
	 * @param start -int
	 * @param limit -int
	 * @param dataId -int
	 * @param chartType -String
	 * @return List<ActivityData> - activityDataList
	 * @throws DataAccessException
	 */
	public List<ActivityData> getCurrentPageActivityByDataKeyAndChartType(int monitorId,int start,int limit, final int dataId, final String chartType,String netuserId) throws DataAccessException ;
	
	/**
	 * add activity data.
	 * @param monitorId -int
	 * @param chartKey -int
	 * @param chartType -String
	 * @param activityList -List<ActivityDate>
	 * @return count -int
	 * @throws DataAccessException
	 */
	public int addActivityData(final int monitorId, final int chartKey,final String chartType, List<ActivityData> activityList) throws DataAccessException ;
	
	/**
     * get all serial number by monitor id and chart type in spc activity.
     * @param monitorId -int
     * @param chartType -String
     * @param serialNumberIterator -Iterator<String>
     * @return List<String>
	 * @throws DataAccessException
     */
	public List<String> getAllSerialNumberByMonitorIdAndChartType(final int monitorId, final String chartType, Iterator<String> serialNumberIterator) throws DataAccessException;
	
	public List<ActivityData> getNoDealDataFromActivity(int datakey,String oldChart);
}
